#pragma once




struct XRECT_WH
{
	XINT32 X;
	XINT32 Y;
	XINT32 Width;
	XINT32 Height;
};


struct XRECTF_WH
{
	XFLOAT X;
	XFLOAT Y;
	XFLOAT Width;
	XFLOAT Height;
public: 
	//struct XSIZEF & Size()
	//{
	//	throw std::logic_error("The method or operation is not implemented.");
	//}
	//struct XPOINTF & Point()
	//{
	//	throw std::logic_error("The method or operation is not implemented.");
	//}
};


struct XRECTF_RB
{
	XFLOAT left;
	XFLOAT top;
	XFLOAT right;
	XFLOAT bottom;
};


struct XPOINTF
{
	XFLOAT x;
	XFLOAT y;
public: 
	struct XPOINTF operator+(const struct XPOINTF & vec);
	struct XPOINTF operator*(const XDOUBLE vec) const;
	XFLOAT operator*(const struct XPOINTF & vec) const;
	void operator/=(const XDOUBLE rScale);
	void operator*=(const XFLOAT vec);
	struct XPOINTF operator-(const struct XPOINTF & pt) const;
	void operator-=(const struct XPOINTF & vec);
	void operator+=(const struct XPOINTF & vec);
	XUINT32 operator==(const struct XPOINTF & other);
};



struct XSIZEF
{
	XFLOAT width;
	XFLOAT height;
};



const struct XGUID
{
	UINT Data1;
	UINT16 Data2;
	UINT16 Data3;
	char Data4[8];
};


struct XPOINT
{
	XINT32 x;
	XINT32 y;
	public: 
		struct XPOINT operator-(const struct XPOINT & pt) const;
};


struct XSIZE
{
	XINT32 Width;
	XINT32 Height;
};


struct XRECT_RB
{
	XINT32 left;
	XINT32 top;
	XINT32 right;
	XINT32 bottom;
};


struct XRECTF_CR
{
	XFLOAT topLeft;
	XFLOAT topRight;
	XFLOAT bottomRight;
	XFLOAT bottomLeft;
};


struct XGRIDLENGTH
{
	UINT type;
	XFLOAT value;
	static const XFLOAT Default;
};


struct XSYSTEMTIME
{
	UINT16 wYear;
	UINT16 wMonth;
	UINT16 wDayOfWeek;
	UINT16 wDay;
	UINT16 wHour;
	UINT16 wMinute;
	UINT16 wSecond;
	UINT16 wMilliseconds;
};


struct XPOINTD
{
	XDOUBLE x;
	XDOUBLE y;
};


struct XCOLORF
{
	XFLOAT r;
	XFLOAT g;
	XFLOAT b;
	XFLOAT a;
};



struct XCHARFORMAT
{
	XUINT32 Size;
	XUINT32 Mask;
	XUINT32 Effects;
	XINT32 Height;
	XINT32 Offset;
	XUINT32 TextColor;
	XUINT8 CharSet;
	XUINT8 PitchAndFamily;
	XUINT16 FaceName[32];
};


struct XCHARFORMAT2 :
	public XCHARFORMAT
{
	XINT16 Weight;
	XINT16 Spacing;
	XUINT32 BackColor;
	XUINT32 Lcid;
	XUINT32 Reserved;
	XINT16 Style;
	XINT16 Kerning;
	XUINT8 UnderlineType;
	XUINT8 Animation;
	XUINT8 RevAuthor;
};




struct XPARAFORMAT
{
	XUINT32 Size;
	XUINT32 Mask;
	XINT16 Numbering;
	XINT16 Effects;
	XINT32 StartIndent;
	XINT32 RightIndent;
	XINT32 Offset;
	XINT16 Alignment;
	XINT16 TabCount;
	XINT32 Tabs[32];
};

struct XPARAFORMAT2 :
	public XPARAFORMAT
{
	XINT32 SpaceBefore;
	XINT32 SpaceAfter;
	XINT32 LineSpacing;
	XINT16 Style;
	XUINT8 LineSpacingRule;
	XUINT8 OutlineLevel;
	XINT16 ShadingWeight;
	XINT16 ShadingStyle;
	XINT16 NumberingStart;
	XINT16 NumberingStyle;
	XINT16 NumberingTab;
	XINT16 BorderSpace;
	XINT16 BorderWidth;
	XINT16 Borders;
};


struct XSOCKADDR
{
	XUINT16 sa_family;
	XUINT8 sa_data[14];
};

union XX128
{
	__m128 flt128;
	__m128i int128;
	__m128d dbl128;
};


struct XTIMERANGE
{
	XFLOAT Start;
	XFLOAT End;
};


struct XNAME
{
	XUINT32 cNamespace;
	XUINT32 cName;
	XCHAR * pNamespace;
	XCHAR * pName;
};



struct XPOINTF4
{
	XFLOAT x;
	XFLOAT y;
	XFLOAT z;
	XFLOAT w;
	void operator*=(const XDOUBLE vec);
	void operator/=(const XDOUBLE vec);
	struct XPOINTF4 operator+(const struct XPOINTF4 & vec);
	struct XPOINTF4 operator-(const struct XPOINTF4 & vec);
	struct XPOINTF4 operator*(const XDOUBLE rScale) const;
};


struct XTABLE
{
	XUINT32 m_cString;
	const XCHAR * m_pString;
	XINT32 m_nValue;
};


struct XResultToECodePair
{
	HRESULT m_hrErr;
	XUINT32 m_iErrorCode;
};


struct XVECTOR_SSE
{
	XFLOAT m_r1;
	XFLOAT m_r2;
	XFLOAT m_r3;
	XFLOAT m_r4;
};

struct DragMsg
{
	enum MessageMap m_msgID;
	XINT32 m_xPos;
	XINT32 m_yPos;
	XUINT32 m_fileCount;
	XUINT32 m_filePathSize;
	XCHAR * m_filePaths;
	DragMsg();
	~DragMsg();
};

struct ManipulationTransform
{
	struct XPOINTF m_pointTranslation; 
	XFLOAT m_floatScale;
	XFLOAT m_floatExpansion;
	XFLOAT m_floatRotation;
	ManipulationTransform();
	~ManipulationTransform();
};

struct ManipulationVelocity
{
	struct XPOINTF m_pointLinear;
	XFLOAT m_floatExpansion;
	XFLOAT m_floatAngular;
	ManipulationVelocity();
	~ManipulationVelocity();
};


struct TouchInteractionMsg
{
	void * m_hWnd;
	enum MessageMap m_msgID;
	enum XPointerInputType m_pointerInputType;
	XLONG m_lTime;
	struct XPOINTF m_pointInteraction;
	struct XPOINTF m_pointPivot;
	XBOOL m_bInertial;
	XBOOL m_bPivotEnabled;
	struct ManipulationTransform m_delta;
	struct ManipulationTransform m_cumulative;
	struct ManipulationVelocity m_velocity;
	XUINT32 m_holdingState;
	XFLOAT m_fInertiaTranslationDeceleration;
	XFLOAT m_fInertiaTranslationDisplacement;
	XFLOAT m_fInertiaRotationDeceleration;
	XFLOAT m_fInertiaRotationAngle;
	XFLOAT m_fInertiaExpansionDeceleration;
	XFLOAT m_fInertiaExpansionExpansion;
	TouchInteractionMsg();
	~TouchInteractionMsg();
};

struct PhysicalKeyStatus
{
	XUINT32 m_uiRepeatCount;
	XUINT32 m_uiScanCode;
	XBOOL m_bIsExtendedKey;
	XBOOL m_bIsMenuKeyDown;
	XBOOL m_bWasKeyDown;
	XBOOL m_bIsKeyReleased;
	PhysicalKeyStatus();
	~PhysicalKeyStatus();
};

struct PointerInfo
{
	enum XPointerInputType m_pointerInputType;
	XUINT32 m_pointerId;
	XUINT32 m_frameId;
	void * m_hDevice;
	struct XPOINTF m_pointerLocation;
	XUINT32 m_timeStamp;
	XBOOL m_bInContact;
	XBOOL m_bInRange;
	XBOOL m_bInPrimary;
	XBOOL m_bCanceled;
	XBOOL m_bLeftButtonPressed;
	XBOOL m_bRightButtonPressed;
	XBOOL m_bMiddleButtonPressed;
	void * m_pCoreWindow;
	PointerInfo();
	~PointerInfo();
};

struct TouchPoint
{
	XUINT32 m_touchID;
	struct XPOINTF m_touchPoint;
	struct XSIZEF m_touchSize;
	XUINT32 m_timeStamp;
	XUINT32 m_touchMessageType;
};


struct InputMessage
{
	enum MessageMap m_msgID;
	void * m_hWindow;
	void * m_hCoreWindow;
	void * m_hPlatformPacket;
	XULONG m_langID;
	XINT32 m_xPos;
	XINT32 m_yPos;
	XINT32 m_iWheelDelta;
	enum XKEYCODE m_xKeyCode;
	XUINT32 m_platformKeyCode;
	XUINT32 m_modifierKeys;
	XUINT16 * m_pCharacterCode;
	XUINT32 m_cCharacterCode;
	XBOOL m_bInverted;
	XBOOL m_bIsSecondaryMessage;
	enum XDeviceType m_xDeviceType;
	XUINT32 m_cStylusPoints;
	struct XPOINTF * m_pStylusPoints;
	XFLOAT * m_pStylusPressureFactors;
	XUINT32 m_cTouchPoints;
	struct TouchPoint * m_pTouchPoints;
	struct PhysicalKeyStatus m_physicalKeyStatus;
	struct PointerInfo m_pointerInfo;
	enum XAPPCOMMAND m_xAppCommand;
	InputMessage();
	~InputMessage();
};



